﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;

namespace EMRI.EmergencyCare.Web.Helper
{
    public static class SessionHelper
    {
        public const string LOCATION = "Location";

        public static string GetLocation(HttpContextBase context)
        {
            return (context.Session != null)
                       ? context.Session[LOCATION] as string
                       : string.Empty;
        }

        public static void SetLocation(HttpContextBase context, string location)
        {
            if (context.Session != null && !string.IsNullOrEmpty(location)) context.Session[LOCATION] = location;
        }
    }
}